package com.sgb.capital.view.pop;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.sgb.capital.R;

import razerdp.basepopup.BasePopupWindow;

/**
 * 作者:张磊
 * 日期:2021/11/11 0016
 * 说明:银行卡提示
 */
public class BankTipPop extends BasePopupWindow {

    private TextView mTvBankCard;
    private TextView mTvBankName;
    private TextView mTvBankAccountName;
    public TextView mTvSure;

    public BankTipPop(Context context) {
        super(context);
    }

    @Override
    public View onCreateContentView() {
        View v = createPopupById(R.layout.capital_banktip_pop);
        // 银行卡号
        mTvBankCard = v.findViewById(R.id.tv_bankCard);
        // 银行名称
        mTvBankName = v.findViewById(R.id.tv_bank_name);
        // 开户行
        mTvBankAccountName = v.findViewById(R.id.tv_bankAccountName);
        // 确认
        mTvSure = v.findViewById(R.id.tv_sure);

        v.findViewById(R.id.tv_cancel).setOnClickListener(v1 -> dismiss());
        setOutSideDismiss(false);
        return v;
    }


    public void setData(String bankCard, String bankName, String bankAccountName) {
        mTvBankCard.setText(bankCard);
        mTvBankName.setText(bankName);
        mTvBankAccountName.setText(bankAccountName);
    }

    public void show() {
        showPopupWindow();
    }
}